﻿Ext.extend(NExt.form.RadioGroup, Ext.form.RadioGroup, {
    getModel: function() {
        var selectedRadio = NExt.form.RadioGroup.superclass.getValue.call(this);

        if (!selectedRadio) {
            return null;
        }

        var model = selectedRadio.getModel();
        return model;
    },

    setModel: function(model) {
        this.eachItem(function(radio) {
            radio.setModel(model);
        });
    }
});